<?php

namespace app\admin\validate;

use think\Validate;

class MinerVideo extends Validate
{
    protected $rule = [
        'id' => 'require|number',
        'pageIndex' => 'require|number',
        'pageSize' => 'require|number',
        'sup_type' => 'require|number',
        'is_deal' => 'require|number',
        'ids' => 'require',
        'model_id' => 'require|number',
        'video_title' => 'require|min:2',
    ];

    //定义验证提示
    protected $message = [
        'id.require' => 'ID不能为空',
        'id.number' => 'ID参数错误',
        'pageIndex.require' => '页码参数不能为空',
        'pageIndex.number' => '页码参数错误',
        'pageSize.require' => '分页条数不能为空',
        'pageSize.number' => '分页条数参数错误',
        'name.require' => '名称不能为空',
        'category.require' => '渠道类型不能为空',
        'category.number' => '渠道类型参数错误',
        'sup_type.require' => '供应商类型不能为空',
        'sup_type.number' => '供应商类型参数错误',
        'ids.require' => 'IDs不能为空',
        'video_title.require' => '视频标题不能为空',
        'video_title.min' => '视频标题不能小于2个字符',
    ];




    protected $scene = [
        'getList' => ['pageIndex','pageSize'],
        'save' => ['video_title'],
        'detail' =>  ['id'],
        'update' => ['id','video_title'],
        'delete' =>  ['ids'],
        'status' => ['id']
    ];

}
